A storage system can be implemented as a server device capable of providing storage related services upon requests from clients. Storage related services include a data access service through which clients can access data stored in storage devices managed by the storage system. To facilitate the data access service, the storage devices may include one or more groups of physical disks in which physical or logical volumes are defined.
A volume has its own metadata (i.e., volume metadata), which contain volume-global information that may pertain to one or more files residing on the volume. Volume metadata can be classified into two categories: volume-level metadata and file-level metadata. Volume-level metadata usually include volume-specific information such as file system type, volume creation time, and free space size. File-level metadata are associated with each file and include file-specific information such as file name, file size, and file attributes.
To maintain metadata consistency, a file system checks volume metadata, during which faulty or obsolete information will be identified and invalidated or updated. For example, when a volume needs to be relocated, file-level metadata, as well as volume-level metadata, should be checked for updates. In particular, it is required to check antivirus attributes in volume metadata for each file in the volume, and virus scanning is performed on the files if needed. However, as the size of a volume and the number of files residing on the volume increase, traversing each and every antivirus attribute may become time-consuming. Indeed, a volume may need to be taken offline for checking all the antivirus attributes for all the files in the volume, which inevitably causes an unavailability of the volume to the clients. Otherwise, a complex algorithm will be needed to keep track of what antivirus attributes have been invalidated or updated.